as_marker_count = 0;

//指挥部
[] call fn_initE5;

//优先选择不同的点，然后再随机
private _e1_num = count as_all_e1;
if(as_num_e1 < _e1_num) then
{
	_e1_num = 0;//都随机
};

private _e2_num = count as_all_e2;
if(as_num_e2 < _e2_num) then
{
	_e2_num = 0;//都随机
};

private _e3_num = count as_all_e3;
if(as_num_e3 < _e3_num) then
{
	_e3_num = 0;//都随机
};

private _e4_num = count as_all_e4;
if(as_num_e4 < _e4_num) then
{
	_e4_num = 0;//都随机
};

//level 4 
for "_i" from 1 to as_num_e4 do
{
	sleep 0.1;
	if(_i <= _e4_num) then
	{
		call (as_all_e4 select (_i - 1));
	}
	else
	{
		call (selectRandom as_all_e4);
	};
	
};

//level 0 平民
for "_i" from 1 to as_num_e0 do
{
	sleep 0.1;
	call (selectRandom as_all_e0);
};

//level 3 
for "_i" from 1 to as_num_e3 do
{
	sleep 0.1;
	if(_i <= _e3_num) then
	{
		call (as_all_e3 select (_i - 1));
	}
	else
	{
		call (selectRandom as_all_e3);
	};
};

//level 2 
for "_i" from 1 to as_num_e2 do
{
	sleep 0.1;
	if(_i <= _e2_num) then
	{
		call (as_all_e2 select (_i - 1));
	}
	else
	{
		call (selectRandom as_all_e2);
	};
};


//level 1 
for "_i" from 1 to as_num_e1 do
{
	sleep 0.1;
	if(_i <= _e1_num) then
	{
		call (as_all_e1 select (_i - 1));
	}
	else
	{
		call (selectRandom as_all_e1);
	};
};






